package models

import (
	"encoding/json"
	"goft/src/goft"
)

type TestModel struct {
	ID       int    `json:"id" gorm:"column:id" uri:"id" binding:"required,gt=0"`
	UserID   int    `json:"userid" gorm:"column:userid"`
	UserName string `json:"user_name" gorm:"column:username"`
	Context  string `json:"context" gorm:"colummn:context"`
}

func NewTestModel() *TestModel {
	return &TestModel{}
}

func (this *TestModel) String() string {
	msg, err := json.Marshal(this)
	goft.Error(err)
	return string(msg)
}
